<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Carica File</title>
<link href="css/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript">
function checkForm(){
	var form = document.getElementById('Myform');
	
	if(form.file.value == '') {
		alert('scegliere un file');
		return false;
	}
	return true;
}
</script>
</head>
<body>
<jsp:include page="/header.jsp"></jsp:include>

<div id="sidebar">

	<jsp:include page="/File/menuFile.jsp"></jsp:include>
	<ul>
		<li><html:link href="preparaGestioneFiles.do">Gestione File</html:link></li>
	</ul>
	
</div>
<div id="content">
	<html:errors/>
	<h3>Carica File</h3>
	<form id="Myform" name="DocumentoForm" method="post" action="/GestioneDocumentale/fileUpload.do" enctype="multipart/form-data">
		File : <input type="file" name="file" value=""> <br><br>
		<input type="reset" value="Reset" />
		<input type="hidden" name="pagina" value="update" />
		<input type="submit" value="Carica" onclick="return checkForm();"/>
	</form>
</div>

<jsp:include page="/footer.jsp"></jsp:include>
</body>
</html>